package ui.prototypes;

import android.app.Activity;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.os.Bundle;

public class CashFlowItemEditorActivity extends Activity {

    private CashFlowItemEditorFragment mCFEditFragment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.default_layout);

        mCFEditFragment = (CashFlowItemEditorFragment) getFragmentManager().findFragmentById(R.id.cash_flow_fragment);

        if(mCFEditFragment == null) {

            mCFEditFragment = new CashFlowItemEditorFragment();

            FragmentManager fmanager = getFragmentManager();
            FragmentTransaction ftransaction = fmanager.beginTransaction();
            ftransaction.add(R.id.main_frame, mCFEditFragment);
            ftransaction.commit();
        }
    }

}
